using System;

namespace DA.AnimGraph.Editor {

    /// <summary>
    /// <see cref="InspectorDataSource"> 的子类中，标记需要显示编辑控件的字段
    /// </summary>
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
    public class InspectorFieldAttribute : Attribute {

        public readonly int order; // 排序序号，默认100
        public readonly string tag; // 用于自定义ui和查询的key
        public readonly string label; // 用于名称显示和控件name，不填则使用变量名
        public readonly bool isList; // 标记是否为List<>类型

        public InspectorFieldAttribute(string tag = null, bool isList = false, string label = null, int order = 100) {
            this.order = order;
            this.tag = tag;
            this.isList = isList;
            this.label = label;
        }
    }

}